using System;
using System.Runtime.InteropServices;
using System.Text;

namespace NTrace
{
    /// <summary>
    /// See the Platform SDK docs for WNODE_HEADER
    /// </summary>
    [StructLayout(LayoutKind.Explicit)]
    internal class TraceHeader
    {
        [FieldOffset(0)]
        public uint BufferSize;
        [FieldOffset(4)]
        public uint ProviderId;
        //union 
        //{    
        [FieldOffset(8)]
        public UInt64 HistoricalContext;
        //    struct 
        //    {      
        [FieldOffset(8)]
        public uint Version;
        [FieldOffset(12)]
        public uint Linkage;
        //    };  
        //};  
        //union 
        //{    
        [FieldOffset(16)]
        IntPtr KernelHandle;
        [FieldOffset(16)]
        Int64 TimeStamp;
        //};  
        [FieldOffset(24)]
        public Guid Guid;
        [FieldOffset(40)]
        public uint ClientContext;
        [FieldOffset(44)]
        public uint Flags;
    }
}
